package com.zhongda.cloud.sample.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.zhongda.cloud.sample.client.AccountService;

@RestController
public class SampleController {

	@Autowired
	private AccountService accountService;
	
	@GetMapping("/sample/{accountName}" )
	public String sample(@PathVariable("accountName") String accountName)
	{
		return "hahahaha";
	}
	
	@GetMapping("/sample1" )
	public String sample1()
	{
		
		return accountService.hahahahah1();
	}
	
	@GetMapping("/sample2/{accountName}" )
	public String sample2(@PathVariable("accountName") String accountName)
	{
		return "hahahaha22 " +accountName;
	}
	
	@GetMapping("/sample3" )
	public String sample3()
	{
		return "sample/sample3";
	}
}
